import React, { Component } from "react";
import Item from "../Item";
export default class List extends Component {
  render() {
    const { todos, changeChecked, deleteLi } = this.props;
    return (
      <ul className="todo-main">
        {todos.map((item, index) => {
          return (
            <Item
              todo={item}
              changeChecked={changeChecked}
              key={item.id}
              deleteLi={deleteLi}
            />
          );
        })}
      </ul>
    );
  }
}
